<?php
class Delivery_Model_DbTable_SearchLog
	extends Delivery_Model_DbTable_Abstract

{
	protected $_name = 'log_search';
	protected $_primary = 'idLog';

	public function insert( $what, $where, $ip, $resultados ){
		
		$data = array('ip' => new Zend_Db_Expr("INET_ATON('{$ip}')"));
		
		if( !empty($what)){
			$data['what'] = $what;
		}
		
		if( !empty($where)){
			$data['where'] = $where;
		}
		
		$data['resultados'] = $resultados;
		
		
		return parent::insert(	
			$this->_fecha( $data, true, false )
		);	
	}
}